package com.ayx.springcloud.controller;

import com.ayx.springcloud.entities.CommonResult;
import com.ayx.springcloud.entities.Payment;
import com.ayx.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {

    @Autowired
    private PaymentService paymentService;

    @GetMapping("consumer/payment/get/{id}")
    public CommonResult<Payment> get(@PathVariable("id") Long id){
        return paymentService.create(id);
    }
}
